<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .haha{
            background-color: red;
        }
    </style>
</head>
<body>
<div id="app">
<!--把事件绑定到属性上-->
  <div :class="{haha:info===1}" @mouseover="info=1" style="height: 20px;width: 30px">1</div>
  <div :class="{haha:info===2}" @mouseover="info=2" style="height: 20px;width: 30px">2</div>
  <div :class="{haha:info===3}" @mouseover="info=3" style="height: 20px;width: 30px">3</div>

</div>

<script src="./node_modules/vue/dist/vue.js"></script>
<script>
    let app = new Vue({
        el: "#app",
        data: {
          info:1
        }

    });
</script>
</body>
</html>